const arr = [1,2,3,4,5,6,6,1,6,2,3,4,0]

var arr2 = []

for (let i = 0; i < arr.length; i++) {
    if (arr2.indexOf(arr[i]) === -1) {
        arr2.push(arr[i])
    }
}

// 2. 利用对象的属性不能相同的特点
var obj = {}
for (i in arr){
    obj[arr[i]] = '随便'

}
arr3 = []
for (i in obj){
    arr3.push(Number(i))
}
// console.log(arr3)


// 3. 利用new Set()方法
var arr4 = new Set(arr)
var arr5 = Array.from(arr4)

console.log(arr5)